package com.gong.DesignPattern.StatePattern;

/**
 * @author GongChang
 * @version 1.0
 * @date 2021/7/5 0005 9:09
 */
public class Test {

    public static void main(String[] args) {
        Context context = new Context();

        StartState startState = new StartState();
        startState.doAction(context);

        System.out.println(context.getState().toString());

        StopState stopState = new StopState();
        stopState.doAction(context);

        System.out.println(context.getState().toString());
    }
}
